home *** CD-ROM | disk | FTP | other *** search
- #define HEADER "C++ Problem 2.6 by Rick Conn using Borland C++"
-
- #include <stdio.h>
-
- struct book {
- char title[40];
- char author[20];
- };
-
- void print_book (book &name)
- {
- printf(" Title: %s\n", name.title);
- printf("Author: %s\n", name.author);
- }
-
- void main(void)
- {
- printf("%s\n", HEADER);
-
- book textbook = { "Turbo C++ DiskTutor",
- "Voss & Chui" };
- book refbook = { "The Annotated C++ Reference Manual",
- "Ellis & Stroustrup" };
- print_book (textbook);
- print_book (refbook);
- }
-